home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 218 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: lrz-muenchen.de!sun2!ua302aa
  2. From: ua302aa@sun2.lrz-muenchen.de (Kurt Watzka)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: qsort help
  5. Date: 3 Jan 1996 11:47:56 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4cdqdc$g57@sparcserver.lrz-muenchen.de>
  9. References: <4ccio7$7c0@charm.magnus.acs.ohio-state.edu> <DKLDuJ.9Er@eskimo.com>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11. Keywords: qsort
  12.  
  13. mag@eskimo.com (mAg) writes:
  14.  
  15. >In article <4ccio7$7c0@charm.magnus.acs.ohio-state.edu> (3 Jan 1996 00:31:03 GMT), 
  16. >xiaoyi@bmecg.bme.ohio-state.edu says :
  17. >>
  18. >>Hi, I am having some problems with the qsort routine.
  19. >>
  20. >>
  21. >change 
  22.  
  23. >>int (*compar)(int *a, int *b)
  24.  
  25. >to
  26.  
  27. >int compar(int *a, int *b)
  28.  
  29. This will not help much if the representation of a pointer to int is
  30. different from the representation of a void pointer. We can be sure
  31. that pointers to char have the same representation as void pointers,
  32.  
  33. The signatures of the functions are still different, and you should
  34. still get a diagnostic message.
  35.  
  36. Kurt
  37. --
  38. | Kurt Watzka                             Phone : +49-89-2180-6254
  39. | watzka@stat.uni-muenchen.de
  40. | ua302aa@sunmail.lrz-muenchen.de
  41.  
  42.